package com.qhgrain.api.menurolepermission.service;

import java.util.List;

import com.paas.base.modules.utils.page.PageBean;
import com.qhgrain.api.menurolepermission.entity.Permission;
import com.qhgrain.api.menurolepermission.info.PermissionInfo;

public interface IPermissionService {

	void add(Permission permission);
	
	void update(Permission permission);
	
	void delete(List<String> ids);
	
	Permission find(String permissionId);
	
	PermissionInfo findInfo(String permissionId);
	/**
	 * 根据权限值查询对象，权限值是唯一的
	 * @param pvalue
	 * @return
	 */
	Permission queryByPvalue(String pvalue);
	
	PageBean<PermissionInfo> queryPage(String id, String name, String type,
			String menuName, String appId, int pageNo, int pageSize) ;
	
	List<Permission> queryByMenus(List<String> menuIds);
	
	List<PermissionInfo> queryByUserApp(String userId, String appId,String permissionType);
	
	List<PermissionInfo> queryByRoleApp(String roleId,String appId,String permissionType);
}
